3.193 \(\int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx\)

Optimal. Leaf size=25 \[ \frac{a \log (\sin (c+d x))}{d}-\frac{a \csc (c+d x)}{d} \]

[Out]

-((a*Csc[c + d*x])/d) + (a*Log[Sin[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0360492, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {2833, 12, 43} \[ \frac{a \log (\sin (c+d x))}{d}-\frac{a \csc (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*Csc[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Csc[c + d*x])/d) + (a*Log[Sin[c + d*x]])/d

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \cot (c+d x) \csc (c+d x) (a+a \sin (c+d x)) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a^2 (a+x)}{x^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac{a \operatorname{Subst}\left (\int \frac{a+x}{x^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{a \operatorname{Subst}\left (\int \left (\frac{a}{x^2}+\frac{1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{a \csc (c+d x)}{d}+\frac{a \log (\sin (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0392552, size = 33, normalized size = 1.32 \[ \frac{a (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}-\frac{a \csc (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*Csc[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Csc[c + d*x])/d) + (a*(Log[Cos[c + d*x]] + Log[Tan[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 28, normalized size = 1.1 \begin{align*} -{\frac{a}{d\sin \left ( dx+c \right ) }}+{\frac{a\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x)

[Out]

-1/d*a/sin(d*x+c)+a*ln(sin(d*x+c))/d

________________________________________________________________________________________

Maxima [A]  time = 1.25986, size = 34, normalized size = 1.36 \begin{align*} \frac{a \log \left (\sin \left (d x + c\right )\right ) - \frac{a}{\sin \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(sin(d*x + c)) - a/sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.63557, size = 82, normalized size = 3.28 \begin{align*} \frac{a \log \left (\frac{1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - a}{d \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(a*log(1/2*sin(d*x + c))*sin(d*x + c) - a)/(d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \cos{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx + \int \sin{\left (c + d x \right )} \cos{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)**2*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(cos(c + d*x)*csc(c + d*x)**2, x) + Integral(sin(c + d*x)*cos(c + d*x)*csc(c + d*x)**2, x))

________________________________________________________________________________________

Giac [A]  time = 1.28595, size = 35, normalized size = 1.4 \begin{align*} \frac{a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac{a}{\sin \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(sin(d*x + c))) - a/sin(d*x + c))/d